<?php

namespace App\Http\Resources\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class MachineResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id'    => $this['id'],
            'city'  => $this['city'],
            'city_name' => implode('',$this['city']),
            'address'   => $this['address'],
            'location'  => $this['location'],
            'is_online' => $this['is_online'],
        ];
    }
}
